package com.youkeda.test.threadpool;

/**
 * @author CoderXshuai
 */
public class Account {
    private double money;

    public void outMoney(double money, String type) {
        switch (type) {
            case "atm":
                outByATM(money);
                break;
            case "window":
                outByWindow(money);
                break;
            default:
                break;
        }
    }

    private void outByATM(double money) {
        this.money -= money;
    }

    private void outByWindow(double money) {
        this.money -= money;
    }

    public Account(double money) {
        this.money = money;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }
}
